/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.mes.service;

import com.xy.biz.mes.domain.bo.ManufactureTaskBO;
import com.xy.biz.mes.domain.bo.ManufactureTaskGoodsBO;
import com.xy.biz.mes.domain.query.ManufactureTaskByIdQuery;
import com.xy.biz.mes.domain.query.ManufactureTaskGoodsQuery;
import com.xy.biz.mes.domain.query.ManufactureTaskQuery;
import com.xy.biz.mes.domain.bo.ManufactureTaskRecordBO;
import com.xy.biz.mes.domain.query.ManufactureTaskRecordQuery;
import com.xy.biz.mes.domain.req.HandOverGoodsRequest;
import com.xy.biz.mes.domain.req.HandOverRequest;
import com.xy.biz.mes.domain.req.SaveManufactureTaskRequest;
import com.xy.biz.mes.domain.resp.GetManufactureTaskCodeResponse;
import com.xy.biz.mes.listener.ManufactureTaskListener;
import com.xy.lang.domain.Result;

import java.util.Collection;
import java.util.List;

/**
 *
 *
 * @author zsp
 * @date 2022-1-6
 */
public interface ManufactureTaskService {

    void addListener(ManufactureTaskListener listener);

    void removeListener(ManufactureTaskListener listener);


    /**
     * 保存多个
     *
     * @param collection
     */
    Result<?> saveAllManufactureTask(Collection<ManufactureTaskBO> collection);

    /**
     * 更新
     *
     * @param manufactureTaskBO
     */
    Result<?> updateManufactureTask(ManufactureTaskBO manufactureTaskBO);

    /**
     * 删除
     *
     * @param manufactureTaskId
     */
    Result<?> deleteManufactureTask(Long manufactureTaskId);

    /**
     * 查找一个
     *
     * @param query
     * @return
     */
    ManufactureTaskBO getManufactureTask(ManufactureTaskByIdQuery query);

    /**
     * 查找多个
     *
     * @param collection 标识集合
     */
    List<ManufactureTaskBO> listManufactureTaskById(Collection<Long> collection);

    /**
     * 查找多个
     *
     * @param query 查找条件
     */
    List<ManufactureTaskBO> listManufactureTask(ManufactureTaskQuery query);
    List<GetManufactureTaskCodeResponse> listOwnerManufactureTaskCode(ManufactureTaskQuery query);

    /**
     * 交付
     */
    Result<?> handOverManufactureTask(HandOverRequest request);

    List<ManufactureTaskGoodsBO> listManufactureTaskGoods(ManufactureTaskGoodsQuery query);
    /**
     * 统计个数
     *
     * @param query 查找条件
     */
    int countManufactureTask(ManufactureTaskQuery query);
    int countManufactureTaskGoods(ManufactureTaskGoodsQuery query);

    /**
     * 保存多个
     */
    Result<?> saveAllManufactureTaskRecord(ManufactureTaskBO manufactureTaskBO);
    Result<?> saveAllManufactureTaskEquipment(ManufactureTaskBO manufactureTaskBO);
    Result<?> saveAllManufactureTaskGoods(ManufactureTaskBO manufactureTaskBO);

    /**
     * 核查
     */
    Result<?> checkManufactureTask(ManufactureTaskBO manufactureTaskBO);

    /**
     * 查找多条
     *
     * @param query
     * @return
     */
    List<ManufactureTaskRecordBO> listManufactureTaskRecord(ManufactureTaskRecordQuery query);

}
